<% ' Edit the below path to point to your Database. This folder must allow write permissions ' For the IUSER_????? Account name DBCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=D:\html\users\danielwalkerbiz\database\diary.mdb" %> <% Session.LCID = 2057 '-------------------------------------------------- Function DtPrevSunday(ByVal dt) Do While WeekDay(dt) > vbSunday dt = DateAdd("d", -1, dt) Loop DtPrevSunday = dt End Function '-------------------------------------------------- Sub diary(dtView) Dim dtToday dtToday = Date() Dim dtCurViewMonth ' First day of the currently viewed month Dim dtCurViewDay ' Current day of the currently viewed month ' Get first day of month dttmp = dtView dtday = day(dttmp) dttmp = dateadd("d", (-dtday+1), dttmp) dtCurViewMonth = dttmp Dim iDay, iWeek, sFontColor %> <% For iDay = vbSunday To vbSaturday %> <%Next %> <% dtCurViewDay = DtPrevSunday(dtCurViewMonth) For iWeek = 0 To 5 Response.Write "" & vbCrLf Dim sBGCOLOR sBGCOLOR = "#ffffff" For iDay = 0 To 6 sBGCOLOR = "#ffffff" If Month(dtCurViewDay) = Month(dtCurViewMonth) Then If dtCurViewDay = dtToday Then sBGCOLOR = "#99ccbb" else sBGCOLOR = "#ffffff" End If Response.Write "" & vbCrLf dtCurViewDay = DateAdd("d", 1, dtCurViewDay) Next Response.Write "" & vbCrLf Next %> <% ' --------END OF DRAW CALENDAR SECTION-------- Response.Write "
">< <%=MonthName(Month(dtCurViewMonth)) & " " & Year(dtCurViewMonth)%> ">>
<%=left(WeekDayName(iDay), 3)%>
" If Month(dtCurViewDay) = Month(dtCurViewMonth) Then If dtCurViewDay = dtToday Then sFontColor = "#ff0000" Else sFontColor = "#00000" End If Response.Write "" Response.Write "" & Day(dtCurViewDay) & "
" End If Response.Write "
" End Sub %> <% set my_conn= Server.CreateObject("ADODB.Connection") my_Conn.Open DBcon StrSql= "Select * from diary where dte = #" & Request("view_Date") & "# ORDER BY dte" rs = my_conn.Execute (StrSql) ' If no records found then no worries just trap error on Error Resume next %> Mortgage Calculator - calcualte your loan payments
Only Authorized Persons can edit the Calendar
 
<%= day(Request("view_date")) & " " & monthname(month(Request("view_date"))) & " " & year(Request("view_date")) %>

Password

" name="view_date">


">Back To Calendar

<% ' call diary(dateadd("m", -1, Request("view_date"))) call diary(Request("view_date")) call diary(dateadd("m", 1, Request("view_date"))) %>
<% my_conn.Close set my_conn = nothing %>